package sk.fritz.megafonsms;

import javax.microedition.lcdui.Item;
import javax.microedition.lcdui.TextField;

public class MegafonModifier implements ItemModifier {

	public Item modifyItem(Item item) {
		if (item.getLabel().equals("messlen")) {
			TextField tf = (TextField) item;
			tf.setConstraints(TextField.UNEDITABLE);
			tf.setString("160");
		}
		if (item.getLabel().startsWith("send_"))
			return null;
		if (item.getLabel().equals("addr")) {
			TextField tf = (TextField) item;
			tf.setConstraints(TextField.PHONENUMBER);
		}
		return item;
	}

}
